package cs.upt.awp.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import cs.upt.awp.dao.TravelNotesDAO;
import cs.upt.awp.data.TravelNote;

public class TravelNotesServices implements DataServices<TravelNote> {
	
	@Autowired
	TravelNotesDAO notesDao;

	@Override
	public boolean addEntity(TravelNote note) throws Exception {
		return notesDao.addEntity(note);
	}

	@Override
	public TravelNote getEntityById(long id) throws Exception {
		return notesDao.getEntityById(id);
	}

	@Override
	public List<TravelNote> getEntityList() throws Exception {
		return notesDao.getEntityList();
	}

	@Override
	public boolean deleteEntity(long id) throws Exception {
		return notesDao.deleteEntity(id);
	}
	
	public List<TravelNote> getRecordNotes(long recordId) throws Exception {
		return notesDao.getRecordNotes(recordId);
	}
	
	public boolean updateNote(TravelNote note) throws Exception {
		return notesDao.updateNote(note);
	}
}
